<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="jquery\jquery.js"></script>
</head>
<body>
    <div>
        请输入圆半径：<input type="text" name="" id="ip1">
        <hr>
        <button id="bt1" >计算</button>
    </div>
    <script>
        $(document).ready(function(){
            $(bt1).click(function(){
                p=$("#ip1").val();
                s=(p*p*3.14).toFixed(2); //保留2位小数点；
                alert(s);
            })
        })

    </script>
</body>
</html>